﻿using Ecommerce.Domain.Holiday;
using Ecommerce.Repository.Interface.Leaves;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Ecommerce.Repository.Impl.Leaves
{
    public class LeaveRepository : BaseRepository<Leave>, ILeaveRepository
    {
        public LeaveRepository(EFContext context) : base(context)
        {
        }
        public async Task<int> AddAsync(Leave leave)
        {
            return await base.AddAsync(leave);
        }

        public async Task<List<Leave>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<Leave>> GetAsync(Expression<Func<Leave, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<Leave> GetModelAsync(int Id)
        {
            return await base.GetModelAsync(Id);
        }

        public async Task<int> Update(Leave leave)
        {
            return await base.Update(leave);
        }
        public async Task<int> DelectAsync(int id)
        {
            return await base.DelectAsync(id);
        }
        public async Task<int> DeleteAsync(List<Leave> meunms)
        {
            context.UpdateRange();
            return await context.SaveChangesAsync();
        }
    }
}
